import React from 'react'
import ReactDOM from 'react-dom/client'
import './index.css'
import { createBrowserRouter, RouterProvider } from 'react-router-dom'
import routes from './router/routes';
import App from './App';

console.log(routes)

const router = createBrowserRouter([
  {
    path: "/",
    Component: App,
    children: routes
  }
])

ReactDOM.createRoot(document.getElementById('root')!).render(
  <React.StrictMode>
    <RouterProvider router={router} fallbackElement={<div>loading...</div>} />
  </React.StrictMode>,
)
